home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11348 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: ix.netcom.com!netnews
  2. From: jdmorris@ix.netcom.com (Jason D. Morris)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: template classes in dll? (VC++ 4.0)
  5. Date: Thu, 14 Mar 1996 01:55:52 GMT
  6. Organization: Netcom
  7. Message-ID: <31477c5a.1116465@nntp.ix.netcom.com>
  8. References: <1996Mar6.133456.3709@cs.mun.ca> <313E48F6.41C67EA6@sparky.hampshire.ma.us>
  9. NNTP-Posting-Host: pon-mi2-13.ix.netcom.com
  10. X-NETCOM-Date: Wed Mar 13  5:55:06 PM PST 1996
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. On Wed, 06 Mar 1996 21:24:54 -0500, Scott Reed
  14. <scott@sparky.hampshire.ma.us> wrote:
  15.  
  16. >I'm having difficulty building a VC++ 4.0 dll with template classes.
  17. >The way I'm using the DllExport spec (actually __declspec(dllexport))
  18. >doesn't appear to fit the syntax for template classes, i.e.
  19. >  template <class T> class DllExport ListOf {...};
  20. >results in a syntax error ("error C2960: template 'class' requires a
  21. >tag-name"). I've searched the online help for hours but I can't figure
  22. >this out. I'd really appreciate any help on this.
  23.  
  24. It's not possible to generate object code for a template class.  In
  25. other words, you can't compile a template class like you can a normal
  26. class.  For the time being, the only option is to distribute template
  27. classes in the form of header files.
  28.  
  29. Jason
  30.  
  31.